﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Data;
using GTServices.Entities;
using System.Globalization;
using GTServices.WPF.Client.ViewModels.Entities;


namespace GTServices.WPF.Client.Converters
{
    public class SeachResultCategoryMatchInfoConverter : IMultiValueConverter
    {

        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            if (values.Count() == 2 &&
               values[0] != null && (values[0] is GrepResultViewModel) &&
               values[1] != null && (values[1] is Category))
            {
                GrepResultViewModel srvm = values[0] as GrepResultViewModel;
                Category c = values[1] as Category;
                //var lcv = new ListCollectionView(srvm.GrepRequest.MatchInfos.Where((x) => x.Categories.Contains(i)).ToList());
               // lcv.Filter = srvm.Filter;
                return null;
            }
            return null;
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
